home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Base Documentation 1998 November
/
IRIX 6.5.2 Base Documentation November 1998.img
/
usr
/
share
/
catman
/
p_man
/
cat3
/
Xm
/
XmTextGetSubstring.z
/
XmTextGetSubstring
Wrap
Text File
|
1998-10-30
|
6KB
|
133 lines
XXXXmmmmTTTTeeeexxxxttttGGGGeeeettttSSSSuuuubbbbssssttttrrrriiiinnnngggg((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmTTTTeeeexxxxttttGGGGeeeettttSSSSuuuubbbbssssttttrrrriiiinnnngggg((((3333XXXX))))
NNNNAAAAMMMMEEEE
XXXXmmmmTTTTeeeexxxxttttGGGGeeeettttSSSSuuuubbbbssssttttrrrriiiinnnngggg - A Text function that retrieves a copy
of a portion of the internal text buffer
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
#include <Xm/Text.h>
iiiinnnntttt XXXXmmmmTTTTeeeexxxxttttGGGGeeeettttSSSSuuuubbbbssssttttrrrriiiinnnngggg(
WWWWiiiiddddggggeeeetttt wwwwiiiiddddggggeeeetttt,
XXXXmmmmTTTTeeeexxxxttttPPPPoooossssiiiittttiiiioooonnnn ssssttttaaaarrrrtttt,
iiiinnnntttt nnnnuuuummmm____cccchhhhaaaarrrrssss,
iiiinnnntttt bbbbuuuuffffffffeeeerrrr____ssssiiiizzzzeeee,
cccchhhhaaaarrrr ****bbbbuuuuffffffffeeeerrrr);
VVVVEEEERRRRSSSSIIIIOOOONNNN
This page documents Motif 2.1.
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
XXXXmmmmTTTTeeeexxxxttttGGGGeeeettttSSSSuuuubbbbssssttttrrrriiiinnnngggg retrieves a copy of a portion of the
internal text buffer of a Text widget. The function copies a
specified number of characters from a given start position
in the internal text buffer into a buffer provided by the
application. A NULL terminator is placed at the end of the
copied data.
The size of the required buffer depends on the maximum
number of bytes per character (MMMMBBBB____CCCCUUUURRRR____MMMMAAAAXXXX) for the current
locale. MMMMBBBB____CCCCUUUURRRR____MMMMAAAAXXXX is a macro defined in ssssttttddddlllliiiibbbb....hhhh. The
buffer should be large enough to contain the substring to be
copied and a NULL terminator. Use the following equation to
calculate the size of buffer the application should provide:
_b_u_f_f_e_r__s_i_z_e = (_n_u_m__c_h_a_r_s* MB_CUR_MAX) + 1
(vvvvooooiiiidddd)
_w_i_d_g_e_t Specifies the Text widget ID.
_s_t_a_r_t Specifies the beginning character position from
which the data will be retrieved. This is an
integer number of characters from the beginning of
the text buffer. The first character position is 0
(zero).
_n_u_m__c_h_a_r_s Specifies the number of characters to be copied
into the provided buffer.
_b_u_f_f_e_r__s_i_z_e
Specifies the size of the supplied buffer in
bytes. This size should account for a NULL
terminator.
_b_u_f_f_e_r Specifies the character buffer into which the
internal text buffer will be copied.
Page 1 (printed 10/24/98)
XXXXmmmmTTTTeeeexxxxttttGGGGeeeettttSSSSuuuubbbbssssttttrrrriiiinnnngggg((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmTTTTeeeexxxxttttGGGGeeeettttSSSSuuuubbbbssssttttrrrriiiinnnngggg((((3333XXXX))))
For a complete definition of Text and its associated
resources, see XXXXmmmmTTTTeeeexxxxtttt(3).
RRRREEEETTTTUUUURRRRNNNN
XXXXmmmmCCCCOOOOPPPPYYYY____SSSSUUUUCCCCCCCCEEEEEEEEDDDDEEEEDDDD
The function was successful.
XXXXmmmmCCCCOOOOPPPPYYYY____FFFFAAAAIIIILLLLEEEEDDDD
The function failed because it was unable to copy
the specified number of characters into the buffer
provided. The buffer size may be insufficient.
The contents of _b_u_f_f_e_r are undefined.
XXXXmmmmCCCCOOOOPPPPYYYY____TTTTRRRRUUUUNNNNCCCCAAAATTTTEEEEDDDD
The requested number of characters extended beyond
the internal buffer. The function copied
characters between _s_t_a_r_t and the end of the
widget's buffer and terminated the string with a
NULL terminator; fewer than _n_u_m__c_h_a_r_s characters
were copied.
RRRREEEELLLLAAAATTTTEEEEDDDD
XXXXmmmmTTTTeeeexxxxtttt(3) and XXXXmmmmTTTTeeeexxxxttttGGGGeeeettttSSSSuuuubbbbssssttttrrrriiiinnnnggggWWWWccccssss(3).
Page 2 (printed 10/24/98)